import java.util.Arrays;

public class Test {
    public  static int func1(int[] array){
        Arrays.sort(array);

        return array[array.length/2];
    }

    public static void main(String[] args) {
        int[]array={1,2,3,4,8,4,5};
        System.out.println(func1(array));
    }
}
